home *** CD-ROM | disk | FTP | other *** search
- (*----------------------------------------------------------------------*)
- (* GLOBAL VARIABLE DEFINITIONS *)
- (*----------------------------------------------------------------------*)
-
- CONST
- (* 8086/8088 hardware flags *)
-
- Carry_Flag = 1;
- Parity_Flag = 4;
- Aux_Carry_Flag = 16;
- Zero_Flag = 64;
- Sign_Flag = 128;
-
- TYPE
-
- AnyStr = STRING[255] (* Matches any string for parameter passing *);
-
- String2 = STRING[2] (* Two character string *);
-
- FileStr = STRING[65] (* File name string *);
-
- RegPack = RECORD (* 8086/8088 registers *)
- CASE INTEGER OF
- 1: ( Ax, Bx, Cx, Dx, Bp, Si, Di, Ds, Es, Flags : INTEGER );
- 2: ( Al, Ah, Bl, Bh, Cl, Ch, Dl, Dh : BYTE );
- END;
-
- Text_File = TEXT [4096] (* General text file *);
-
- LongInt = RECORD (* 32 bit long INTEGER type *)
- Low : INTEGER;
- High : INTEGER;
- END;
-
- (*----------------------------------------------------------------------*)
- (* Map of MsDos Directory Entry *)
- (*----------------------------------------------------------------------*)
-
- TYPE
-
- Directory_Record = RECORD
- Filler : ARRAY[1..21] Of BYTE;
- File_Attr : BYTE (* File attributes *);
- File_Time : INTEGER (* Creation time *);
- File_Date : INTEGER (* Creation date *);
- File_Size : LongInt (* Size in bytes *);
- File_Name : ARRAY[1..80] Of CHAR (* Name *);
- END;
- (* File attribute values *)
- CONST
- Dir_Attr_Read_Only = 1;
- Dir_Attr_Hidden = 2;
- Dir_Attr_System = 4;
- Dir_Attr_Volume_Label = 8;
- Dir_Attr_Subdirectory = 16;
- Dir_Attr_Archive = 32;
-
- (* File access modes *)
- Access_Read_Mode = 0;
- Access_Write_Mode = 1;
- Access_Read_And_Write_Mode = 2;
-
- (* File attributes *)
- Attribute_None = 0;
- Attribute_Read_Only = 1;
- Attribute_Hidden = 2;
- Attribute_System = 4;
- Attribute_Volume_Label = 8;
- Attribute_Subdirectory = 16;
- Attribute_Archive = 32;
-
- (*----------------------------------------------------------------------*)
- (* Error types for .ARC and .LBR files *)
- (*----------------------------------------------------------------------*)
-
- CONST
- Open_Error = 1 (* Error when opening file *);
- Format_Error = 2 (* .ARC/.LBR format bad *);
- End_Of_File = 3 (* End of .ARC/.LBR directory *);
-
- (*----------------------------------------------------------------------*)
- (* Global program variables *)
- (*----------------------------------------------------------------------*)
-
- CONST
- FF_Char : CHAR = ^L (* Form feed character *);
-
- VAR
- Cat_Drive : CHAR (* Drive to catalog *);
- Output_File : Text_File (* File to receive output *);
- Output_File_Name : AnyStr (* Output file name *);
- Do_Printer_Format : BOOLEAN (* Format for printer *);
- Left_Margin : INTEGER (* Left margin *);
- Page_Size : INTEGER (* Page size for output *);
- Expand_Arcs : BOOLEAN (* TRUE to expand .ARC/.LBR *);
- Left_Margin_String : AnyStr (* Blanks for left margin *);
- ArcLbr_Indent : INTEGER (* Indent for .ARC/.LBR *);
- User_Break : BOOLEAN (* TRUE if ^C stops liting *);
- Find_Spec : AnyStr (* File spec for listing *);
- Total_Files : REAL (* Total files found *);
- Total_Space : REAL (* Total space used *);
- Total_Dirs : REAL (* Total dirs scanned *);
- Page_Number : INTEGER (* Current page number *);
- Lines_Left : INTEGER (* Lines left on cur. page *);
- Help_Only : BOOLEAN (* TRUE if doing help only *);
-
- (*----------------------------------------------------------------------*)
- (* Titles and subtitles for paginated listings *)
- (*----------------------------------------------------------------------*)
-
- VAR
- Volume_Title : AnyStr (* Main title for entire listing *);
- Subdir_Title : AnyStr (* Current subdirectory title *);
- File_Title : AnyStr (* Current .ARC/.LBR file if any *);
-
- (*----------------------------------------------------------------------*)
- (* Saved file names from nested directories *)
- (*----------------------------------------------------------------------*)
-
- CONST
- MaxFiles = 2048 (* Maximum files handled *);
-
- TYPE
-
- Short_Dir_Record = RECORD
- File_Attr : BYTE (* File attributes *);
- File_Time : INTEGER (* Creation time *);
- File_Date : INTEGER (* Creation date *);
- File_Size : LongInt (* Size in bytes *);
- File_Name : STRING[12] (* File name *);
- END;
-
- VAR
- (* List of files in current and all *)
- (* previous directories along path *)
- (* back to root directory. *)
-
- File_Stack : ARRAY[1..MaxFiles] OF Short_Dir_Record;
-
- (* # of files currently saved *)
- File_Count : INTEGER;
-
- (*----------------------------------------------------------------------*)
- (* Names of the months for date conversions *)
- (*----------------------------------------------------------------------*)
-
- (* STRUCTURED *) CONST
- Month_Names : ARRAY[1..12] OF STRING[3] =
- ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );